package com.financing.platform.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.financing.platform.dto.FaUserDTO;
import com.financing.platform.vo.EmailTemplateUserVO;
import com.financing.platform.vo.FaUserVO;

public interface IFaUserDao extends
		IBaseDao  {

	/**
	 * Fa列表
	 * @param faUserDTO
	 * @return
	 */
	public List<FaUserDTO> getFaUserList(FaUserDTO faUserDTO);

	/**
	 * Fa列表
	 * @param faUserDTO
	 * @return
	 */
	public List<FaUserDTO> getShopFaUserList(FaUserDTO faUserDTO);
	
	/**
	 * 更新FA信息
	 * @param faUserDTO
	 * @return id
	 */
	public int updateFaUserInfo(FaUserDTO faUserDTO);
	
	/**
	 * 更新FA信息
	 * @param map
	 * @return id
	 */
	public int updateFaUserInfoForMap(Map<String, Object> map) throws SQLException;
	
	/**更新FA信息状态
	 * @param faUserDTO
	 * @return
	 * @throws SQLException
	 */
	public int updateFaUserStatus(FaUserDTO faUserDTO) throws SQLException;
	
	/**
	 * 
	* @Title: getFaUser 
	* @Description: 查询单个FA用户
	* @param   fauserDTO
	* @return FaUserDTO   
	* @throws
	 */
	public FaUserDTO getFaUser(FaUserDTO fauserDTO);
	
	public FaUserDTO getFaUserView(FaUserDTO fauserDTO)throws SQLException;
	
	/**
	 * 获取用户订单数量
	 * @param userId
	 * @return
	 * @throws SQLException
	 */
	public Integer getFaUserOrderCount(String userId)throws SQLException;
	
	/**
	 * 
	* @Title: getAllFaId 
	* @Description: 查询所有faID
	* @return List<Integer>   
	* @param   corpId
	* @throws
	 */
	public List<Integer> getAllFaId(Integer corpId);

	/**
	 * Fa列表 总数
	 * @param faUserDTO
	 * @return
	 */
	public int getFaUserListCount(FaUserDTO faUserDTO) throws SQLException;
	
	/**
	 * Fa列表 总数
	 * @param faUserDTO
	 * @return
	 */
	public int getShopFaUserListCount(FaUserDTO faUserDTO) throws SQLException;
	
	/**
	 * 
	* @Title: queryFaUserListAuthPass 
	* @Description: 查询 用户邀请人数及认证通过的
	* @param   faUserDTO
	* @return List<FaUserDTO>   
	* @throws
	 */
	public List<FaUserVO> queryFaUserListAuthPass(FaUserDTO faUserDTO) throws SQLException;
	
	/**
	 * @throws SQLException 
	 * 
	 * @Title: queryFaUserListAuthPassCount
	 * @Description:查询 用户邀请人数及认证通过的总数 
	 * @param @param faUserDTO
	 * @param @return   
	 * @return int   
	 * @throws
	 */
	public int queryFaUserListAuthPassCount(FaUserDTO faUserDTO) throws SQLException;
	/**
	 * @throws SQLException 
	 * 
	 * @Title: querySingleFaUserListAuthPassCount
	 * @Description:查询 单个用户邀请人数及认证通过的总数 
	 * @param @param faUserDTO
	 * @param @return   
	 * @return int   
	 * @throws
	 */
	public int querySingleFaUserListAuthPassCount(FaUserDTO faUserDTO) throws SQLException;

	/**
	 * 
	* @Title: querySingleFaUserListAuthPass 
	* @Description: 查询 单个用户邀请人数及认证通过的
	* @param   faUserDTO
	* @return List<FaUserDTO>   
	* @throws
	 */
	public List<FaUserDTO> querySingleFaUserListAuthPass(FaUserDTO faUserDTO) throws SQLException;
	
	/**
	 * 
	 * @Title: queryFaUserVerify
	 * @Description: 查询需要审核的FA列表 
	 * @param @return
	 * @param @throws SQLException   
	 * @return List<FaUserNeedVerifyVo>   
	 * @throws
	 */
	public List<EmailTemplateUserVO> queryFaUserVerify() throws SQLException;
	
	/**
	 * 
	 * @Title: queryFaUserVPassEmail
	 * @Description:  查询需要发送推荐产品邮件的邮件地址
	 * @param @param param
	 * @param @return
	 * @param @throws SQLException   
	 * @return List<Map<String,String>>   
	 * @throws
	 */
	public List<String> queryFaUserVPassEmail(Map<String,Integer> param) throws SQLException;

	/**
	 * 获取子用户id
	 * @param param
	 * @return
	 */
	public List<String> queryFaUserSubUserId(Map<String, String> param) throws SQLException;

	public  List<String> queryActSource() throws SQLException;

	public List<FaUserDTO> queryAllFaUserInfoBasic(FaUserDTO faUserDTO) throws SQLException;

	public String queryFrontLicaishiManagerUser(String id)throws SQLException;

	public int queryAllFaUserSystemRateCount(FaUserDTO faUserDTO)throws SQLException;

	public List<FaUserDTO> queryAllFaUserSystemRate(FaUserDTO faUserDTO)throws SQLException;

	public void updateFaUserSystemRate(FaUserDTO faUserDTO)throws SQLException;
	/**
	 * 
	* @Title:  
	* @Description: 查询没有服务顾问的用户  
	* date  某段时间后
	* @throws
	 */
	public List<FaUserDTO> queryFaUserNomanager(String date)throws SQLException;
}